package com.example.net.http



import com.example.baseutils.Constance.ROUTE
import com.example.net.http.response.BannerResponse
import com.example.net.http.response.BaseResponse
import com.example.net.http.response.DeviceResponse
import com.example.net.http.response.MergeResponse
import com.example.net.http.response.QrResponse
import okhttp3.RequestBody
import retrofit2.http.*

/**
 */
interface FantacyService {
    companion object{
        const val TENANT_ID=185
    }
    @GET("$ROUTE/app-api/fantasy/device/get-device/")
    suspend fun getDeviceInfo(@Query("no") deviceNo:String,@Header("tenant-id") id:Int=TENANT_ID): BaseResponse<DeviceResponse>

    @GET("$ROUTE/app-api/fantasy/product/spu/get-detail/")
    suspend fun getBanner(@Query("id") sceneId:Int,@Header("tenant-id") id:Int=TENANT_ID): BaseResponse<BannerResponse>

    @POST("$ROUTE/app-api/fantasy/trade/order/deviceMerge/")
    suspend fun pushPhoto(@Body requestBody: RequestBody,@Header("tenant-id") id:Int=TENANT_ID): BaseResponse<MergeResponse>

    @POST("$ROUTE/app-api/fantasy/device/heartBeat/")
    suspend fun pushHeart(@Body requestBody: RequestBody, @Header("tenant-id") id:Int=TENANT_ID): BaseResponse<String>

    @GET("$ROUTE/app-api/fantasy/trade/order/getPayQrCode")
    suspend fun queryQr(@Query("id") sceneId:Int,@Header("tenant-id") id:Int=TENANT_ID): BaseResponse<QrResponse>

    @GET("$ROUTE/app-api/fantasy/trade/order/getPayStatus")
    suspend fun checkPay(@Query("orderId") orderId:Int,@Header("tenant-id") id:Int=TENANT_ID): BaseResponse<Boolean>

}